package com.opdar.athena.entities;

import com.opdar.athena.mapper.FunctionMapper;
import com.opdar.plugins.mybatis.annotations.Field;
import com.opdar.plugins.mybatis.annotations.Id;
import com.opdar.plugins.mybatis.annotations.Namespace;
import com.opdar.plugins.mybatis.annotations.Sort;

import java.sql.Timestamp;
import java.util.LinkedList;
import java.util.List;

/**
 * Created by shiju on 2016/12/7.
 */
@Namespace(value = FunctionMapper.class,tableName = "functions")
public class FunctionEntity {

    @Id
    private Integer id;
    private String icon;
    private String name;
    private String path;
    private Integer parentId;
    private String module;
    private String desc;
    private Integer vaild;
    @Sort
    private Integer sort;
    @Field(insert = false,update = false,delete = false,select = false)
    private String roleId;
    private Timestamp createTime;
    private Timestamp updateTime;
    private List<FunctionEntity> childs = new LinkedList<FunctionEntity>();

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getVaild() {
        return vaild;
    }

    public void setVaild(Integer vaild) {
        this.vaild = vaild;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public List<FunctionEntity> getChilds() {
        return childs;
    }

    public void setChilds(List<FunctionEntity> childs) {
        this.childs = childs;
    }
}
